<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Thu May 17 09:03:43 UTC 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Injection (jsr330activator.implementation OSGi Bundle 1.1.1-SNAPSHOT API)</title>
<meta name="date" content="2018-05-17">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="Injection (jsr330activator.implementation OSGi Bundle 1.1.1-SNAPSHOT API)";
        }
    }
    catch(err) {
    }
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Injection.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../no/steria/osgi/jsr330activator/implementation/InjectionBase.html" title="class in no.steria.osgi.jsr330activator.implementation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?no/steria/osgi/jsr330activator/implementation/Injection.html" target="_top">Frames</a></li>
<li><a href="Injection.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">no.steria.osgi.jsr330activator.implementation</div>
<h2 title="Interface Injection" class="title">Interface Injection</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../no/steria/osgi/jsr330activator/implementation/InjectionBase.html" title="class in no.steria.osgi.jsr330activator.implementation">InjectionBase</a>, <a href="../../../../../no/steria/osgi/jsr330activator/implementation/InjectionField.html" title="class in no.steria.osgi.jsr330activator.implementation">InjectionField</a>, <a href="../../../../../no/steria/osgi/jsr330activator/implementation/InjectionMethod.html" title="class in no.steria.osgi.jsr330activator.implementation">InjectionMethod</a></dd>
</dl>
<hr>
<br>
<pre>interface <span class="typeNameLabel">Injection</span></pre>
<div class="block">Defines an injection point in a provider class.
 Called from the bundle activator (or actually,
 from a listener callback), when the service
 becomes available.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Steinar Bang</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#doInject-java.lang.Object-">doInject</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;service)</code>
<div class="block">Set the value of the injection point.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#doRetract-java.lang.Object-">doRetract</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;service)</code>
<div class="block">Unset the injected value, if this is the same object that was
 originally injected.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#getInjectedServiceType--">getInjectedServiceType</a></span>()</code>
<div class="block">Get the type of the injected service</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#getNamedValue--">getNamedValue</a></span>()</code>
<div class="block">Get the value of the <code>Named</code> annotation on the injection member.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#isInjected--">isInjected</a></span>()</code>
<div class="block">Used to determine if the injection point is currently in an
 injected state.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#isOptional--">isOptional</a></span>()</code>
<div class="block">Determine if an Injection is optional.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#setupListener-org.osgi.framework.BundleContext-no.steria.osgi.jsr330activator.implementation.ProviderAdapter-">setupListener</a></span>(org.osgi.framework.BundleContext&nbsp;bundleContext,
             <a href="../../../../../no/steria/osgi/jsr330activator/implementation/ProviderAdapter.html" title="class in no.steria.osgi.jsr330activator.implementation">ProviderAdapter</a>&nbsp;providerAdapter)</code>
<div class="block">Will set up an OSGi listener for the injected service, so
 that it will be injected when the service appears in OSGi
 and retracted when the service disappears from OSGi.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../no/steria/osgi/jsr330activator/implementation/Injection.html#unGet-org.osgi.framework.BundleContext-">unGet</a></span>(org.osgi.framework.BundleContext&nbsp;context)</code>
<div class="block">Release this injection when stopping the provider.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="getInjectedServiceType--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInjectedServiceType</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;getInjectedServiceType()</pre>
<div class="block">Get the type of the injected service</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a class object defining the injected service.</dd>
</dl>
</li>
</ul>
<a name="getNamedValue--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNamedValue</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getNamedValue()</pre>
<div class="block">Get the value of the <code>Named</code> annotation on the injection member.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>Named.value()</code> or null if the member has no Named annotation</dd>
</dl>
</li>
</ul>
<a name="isOptional--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isOptional</h4>
<pre>boolean&nbsp;isOptional()</pre>
<div class="block">Determine if an Injection is optional.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if the injection is optional, false if it isn't optional.</dd>
</dl>
</li>
</ul>
<a name="isInjected--">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isInjected</h4>
<pre>boolean&nbsp;isInjected()</pre>
<div class="block">Used to determine if the injection point is currently in an
 injected state.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this injection has been set to a valid value</dd>
</dl>
</li>
</ul>
<a name="doInject-java.lang.Object-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doInject</h4>
<pre>void&nbsp;doInject(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;service)</pre>
<div class="block">Set the value of the injection point.  If the value can't be
 set for any reason, the method is a no-op.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>service</code> - a valid OSGi service that is of the correct type for the injection.</dd>
</dl>
</li>
</ul>
<a name="doRetract-java.lang.Object-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>doRetract</h4>
<pre>void&nbsp;doRetract(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;service)</pre>
<div class="block">Unset the injected value, if this is the same object that was
 originally injected.  If this is false or if the operation
 fails, the method is a no-op.

 Called when receiving an unregistration event about the service.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>service</code> - the service to retract</dd>
</dl>
</li>
</ul>
<a name="setupListener-org.osgi.framework.BundleContext-no.steria.osgi.jsr330activator.implementation.ProviderAdapter-">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setupListener</h4>
<pre>void&nbsp;setupListener(org.osgi.framework.BundleContext&nbsp;bundleContext,
                   <a href="../../../../../no/steria/osgi/jsr330activator/implementation/ProviderAdapter.html" title="class in no.steria.osgi.jsr330activator.implementation">ProviderAdapter</a>&nbsp;providerAdapter)</pre>
<div class="block">Will set up an OSGi listener for the injected service, so
 that it will be injected when the service appears in OSGi
 and retracted when the service disappears from OSGi.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bundleContext</code> - the object to register the listener with</dd>
<dd><code>providerAdapter</code> - the object to notify after an injection has been received and set</dd>
</dl>
</li>
</ul>
<a name="unGet-org.osgi.framework.BundleContext-">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unGet</h4>
<pre>void&nbsp;unGet(org.osgi.framework.BundleContext&nbsp;context)</pre>
<div class="block">Release this injection when stopping the provider.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - </dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Injection.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev&nbsp;Class</li>
<li><a href="../../../../../no/steria/osgi/jsr330activator/implementation/InjectionBase.html" title="class in no.steria.osgi.jsr330activator.implementation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?no/steria/osgi/jsr330activator/implementation/Injection.html" target="_top">Frames</a></li>
<li><a href="Injection.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2018. All rights reserved.</small></p>
</body>
</html>
